Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-02

oracle.AWXML
Class BaseOperator

java.lang.Object
  |
  +--oracle.AWXML.BaseObject
        |
        +--oracle.AWXML.AggregationOperator
              |
              +--oracle.AWXML.BaseOperator

public class BaseOperator
extends AggregationOperator

An object that contains an OperatorType for an aggregation operation; the operator value of the OperatorType specifies the method of aggregation of data over a hierarchy. A BaseOperator is owned by an Aggregation object, which is owned by an AggregationDefinition.

The default OperatorType operator value is SUM. To use a weighted operator, such as HWFIRST or WAVERAGE, you must specify a Parameter with a keyword value of WEIGHTBY for the AggregationArgument owned by the Aggregation.

The following table lists the OperatorType operator values that are valid for an aggregation and provides descriptions of them.

OperatorType Operator Values for Aggregation Methods

Operator Description

AVERAGE

Adds data values, then divides the sum by the number of data values that it added.

FIRST

Uses the first non-NA data value.

HAVERAGE

(Hierarchical Average) Adds data values, then divides the sum by the number of the children in the dimension hierarchy. Unlike AVERAGE, which counts only non-NA children, HAVERAGE counts all of the logical children of a parent.

HFIRST

(Hierarchical First) Uses the first data value that is specified by the hierarchy, even when that value is NA.

HLAST

(Hierarchical Last) Uses the last data value that is specified by the hierarchy, even when that value is NA.

HWAVERAGE

(Hierarchical Weighted Average) Multiplies non-NA child data values by their corresponding weight values then divides the result by the sum of the weight values. Unlike WAVERAGE, HWAVERAGE includes weight values in the denominator sum even when the corresponding child values are NA.

HWFIRST

(Hierarchical Weighted First) Multiplies by its corresponding weight value the first data value that is specified by the hierarchy, even when that value is NA.

HWLAST

(Hierarchical Weighted Last) Multiplies by its corresponding weight value the last data value that is specified by the hierarchy, even when that value is NA.

LAST

Uses the last non-NA data value.

MAX

Uses the largest data value among the children of any parent data value.

MIN

Uses the smallest data value among the children of any parent data value.

NOAGG

Specifies that the data values are not aggregated in the operation.

SSUM

(Scaled Sum) Adds the value of a weight object to each data value, then adds the data values.

SUM

Adds data values. This is the default operator type.

WAVERAGE

(Weighted Average) Multiplies each data value by a weight factor, adds the data values, and then divides that result by the sum of the weight factors.

WFIRST

(Weighted First) The first non-NA data value multiplied by its corresponding weight value.

WLAST

(Weighted Last) The last non-NA data value multiplied by its corresponding weight value.

WMAX

(Weighted Maximum) The largest data value among the children of any parent data value multiplied by its corresponding weight value.

WMIN

(Weighted Minimum) The smallest data value among the children of any parent data value multiplied by its corresponding weight value.

WSUM

(Weighted Sum) Multiplies each data value by a weight factor, then adds the data values.

See Also:
Aggregation

Fields inherited from class oracle.AWXML.BaseObject
DATABASENULL

 

Constructor Summary
BaseOperator(BaseObject input)
          Creates a BaseOperator for the specified Aggregation.

 

Method Summary
 java.lang.String getOpcode()
          Gets the operator value of the OperatorType of the BaseOperator.
 OperatorType getOperatorType()
          Gets the OperatorType of the BaseOperator.
static boolean isBaseOperator(java.lang.String input)
          Indicates whether the specified value is a valid operator value for the OperatorType of the BaseOperator.
 void setOpcode(java.lang.String input)
          Specifies the operator value of the OperatorType of the BaseOperator.
 void setOperatorType(OperatorType input)
          Specifies an OperatorType for the BaseOperator.
 java.lang.String WriteToXML()
          Gets an XML representation of the BaseOperator.

 

Methods inherited from class oracle.AWXML.BaseObject
Alter, Create, CreateAfter, CreateBefore, CreateFirst, DataRead, Delete, getColumnName, getId, getLongName, getLongName, getName, getOwner, getPluralName, getPluralName, getSchema, getShortName, getShortName, setColumnName, setLongName, setLongName, setName, setPluralName, setPluralName, setSchema, setShortName, setShortName

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

BaseOperator

public BaseOperator(BaseObject input)
Creates a BaseOperator for the specified Aggregation. The default operator value of the OperatorType for the BaseOperator is SUM.
Parameters:
input - The Aggregation to own the BaseOperator.

Method Detail

WriteToXML

public java.lang.String WriteToXML()
Gets an XML representation of the BaseOperator.
Overrides:
WriteToXML in class AggregationOperator
Returns:
An XML String that represents the BaseOperator.

setOperatorType

public void setOperatorType(OperatorType input)
Specifies an OperatorType for the BaseOperator. The operator value of the OperatorType specifies the method of aggregation.
Parameters:
input - An OperatorType that specifies the aggregation method to use.

getOperatorType

public OperatorType getOperatorType()
Gets the OperatorType of the BaseOperator.
Returns:
The OperatorType of the BaseOperator.

getOpcode

public java.lang.String getOpcode()
Gets the operator value of the OperatorType of the BaseOperator.
Overrides:
getOpcode in class AggregationOperator
Returns:
A String that contains the operator value of the OperatorType of the BaseOperator.

setOpcode

public void setOpcode(java.lang.String input)
Specifies the operator value of the OperatorType of the BaseOperator. The operator value specifies the method of aggregation.
Parameters:
input - A String that contains the operator value that you want the OperatorType of the BaseOperator to have.

isBaseOperator

public static boolean isBaseOperator(java.lang.String input)
Indicates whether the specified value is a valid operator value for the OperatorType of the BaseOperator.
Parameters:
input - A String that contains an operator value for aggregation.
Returns:
A boolean that is true if the value is a valid operator for aggregation, or false if it is not.

Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-02

Copyright © 2003, 2005 Oracle. All rights reserved.